<template>
  <div class="container">
    <div class="right-info flex-direction-column">
      <div class="top">
        <img :src="authorInfo.avatar_img" width="40" height="40" alt="作者头像" />
        <span class="fz16">{{ authorInfo.nikname }}</span>
      </div>
      <div class="desc display-flex">
        <p>
          文章数: <span>{{ authorInfo.articleCount }}</span>
        </p>
        <p>
          点赞数: <span>{{ authorInfo.total_likes }}</span>
        </p>
        <p>
          粉丝数: <span>{{ authorInfo.follow_num }}</span>
        </p>
      </div>
    </div>
    <!-- 随机文章推荐 -->
    <RandomList width="270px" />
  </div>
</template>

<script>
export default {
  name: 'RightInfo',
  props: {
    authorInfo: {
      type: Object,
      default: () => {}
    }
  }
}
</script>

<style lang="scss" scoped>
.container {
  margin-left: 20px;
}
.right-info {
  width: 250px;
  height: 90px;
  padding: 20px;
  border-radius: 5px;
  background-color: #fff;
  .top {
    margin-bottom: 20px;
    img {
      border-radius: 50%;
    }
    span {
      margin-left: 10px;
    }
  }
}
.desc {
  p {
    margin-right: 15px;
  }
  span {
    font-size: 16px;
    font-weight: bold;
    margin-left: 5px;
    color: #143c64;
  }
}
</style>
